<template>
    <van-nav-bar :title="props.title" fixed
        v-if="route.name == 'index' || route.name == 'list' || route.name == 'shop' || route.name == 'my'" />

    <van-nav-bar :title="props.title" fixed v-else left-text="返回" left-arrow @click-left="onClickLeft" />

</template>

<script setup>
const onClickLeft = () => history.back();

const props = defineProps(['title'])
import { useRoute, useRouter } from 'vue-router'

const router = useRouter()
const route = useRoute()

</script>

<style lang="scss" scoped></style>